package pzl.com.threadlocal.utils;

/**
 * @author zl.peng
 * @version [1.0, 2016-11-15]
 */
public class Util1 {
    //创建一个Integer型的线程本地变量
    public static final ThreadLocal<Integer> threadLocalInteger = new ThreadLocal<Integer>() {
        @Override
        protected Integer initialValue() {
            return 0;
        }
    };

    public static ThreadLocal<Integer> getLocal() {
        return threadLocalInteger;
    }
}
